package day08;

/*
 * Author: JacksonCoder
 * FileName: BufferedReaderExample
 * Version: 1.0.0
 * Date: 2025/4/15
 */

import java.io.*;

public class BufferedReaderExample {

    public static void main(String[] args) {
        try (BufferedReader reader = new BufferedReader(new FileReader("input.txt"));
             BufferedWriter writer = new BufferedWriter(new FileWriter("output.txt"))) {
            String line;
            while ((line = reader.readLine()) != null) {
                writer.write(line);
                writer.newLine(); // 添加换行符
            }
            System.out.println("Buffered copy complete.");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
